package second50;

import CommonStructure.ListNode;

public class T0083 {
    public ListNode deleteDuplicates(ListNode head) {
        ListNode tmp = head;
        while (tmp != null && tmp.next != null) {
            if (tmp.val == tmp.next.val) {
                tmp.next = tmp.next.next;
                continue;
            }
            tmp = tmp.next;
        }
        return head;
    }
}
